import { baseRequest } from '@/utils/request'
import tool from '@/utils/tool'

const requestSeal = (url, ...arg) => baseRequest(`/tender/seal/` + url, ...arg)

export default {
	// 动态上传公章文件返回id
	uploadOfficialSeal(data) {
		const config = {
		    headers: {
		      'token': tool.data.get('CLIENT_TOKEN') // 这里设置token
		    }
		  };
		return requestSeal('uploadOfficialSeal', data, 'post', config)
	},
	// 动态上传名章文件返回id
	uploadNameSeal(data) {
		const config = {
		    headers: {
		      'token': tool.data.get('CLIENT_TOKEN') // 这里设置token
		    }
		  };
		return requestSeal('uploadNameSeal', data, 'post', config)
	},
	// 获取用户上传公章文件列表
	getOfficialSeals() {
		const config = {
		    headers: {
		      'token': tool.data.get('CLIENT_TOKEN') // 这里设置token
		    }
		  };
		return requestSeal('getOfficialSeals', '', 'get', config)
	},
	// 获取用户上传名章文件列表
	getNameSeals() {
		const config = {
		    headers: {
		      'token': tool.data.get('CLIENT_TOKEN') // 这里设置token
		    }
		  };
		return requestSeal('getNameSeals', '', 'get', config)
	},
	// 动态上传名章文件返回id
	uploadWord(data) {
		const config = {
		    headers: {
		      'token': tool.data.get('CLIENT_TOKEN') // 这里设置token
		    }
		  };
		return requestSeal('uploadWord', data, 'post', config)
	}
}
